package dao

import "gorm.io/gorm"

type Shop struct {
	gorm.Model
	UserId    int     `json:"userId" gorm:"type:int(10);not null;comment:'用户编号'"`
	Phone     string  `json:"phone" gorm:"type:varchar(20);not null;comment:'手机品牌'"`
	HowBig    int     `json:"howBig" gorm:"type:int(10);not null;comment:'容量'"`
	WhereBuy  string  `json:"whereBuy" gorm:"type:varchar(20);not null;comment:'购买渠道'"`
	GoodOrBad int     `json:"godOrBad" gorm:"type:tinyint(1);default:1;comment:'1-99新2-95新3-9成新'"`
	Status    int     `json:"status" gorm:"tinyint(1);default:1;comment:'1-在售2-售罄'"`
	Price     float64 `json:"price" gorm:"type:float(10,2);not null;comment:'价格'"`
}

type ShopBuy struct {
	gorm.Model
	UserId int `json:"userId" gorm:"type:int(10);not null;comment:'用户编号'"`
	ShopId int `json:"shopId" gorm:"type:int(10);not null;comment:'商品编号'"`
}
